package com.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.pojo.Department;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author testjava
 * @since 2022-08-20
 */
@Mapper
public interface DepartmentMapper extends BaseMapper<Department> {
    List<Department> selectWithParent(@Param("parentId") Integer parentId);

    List<Department> selectChildrenList(@Param("depId") Integer depId);

    List<Integer> selectRidByUid(@Param("uid") Integer uid);

    List<Department> getPage(@Param("parentId") Integer parentId, @Param("page") Integer page, @Param("pageSize") Integer pageSize);
}
